home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 for Intel / NeXTSTEP 3.2 for Intel.iso / NextLibrary / Documentation / Sybase / DBLIB / Section2 / dbtabname.nr < prev    next >
Encoding:
Text File  |  1993-04-22  |  1.7 KB  |  59 lines

  1. .Na "dbtabname"
  2. .mc |
  3. .Aa
  4. .Fu
  5. Return the name of a table based on its number.
  6. .Ih "table, returning name of"
  7. .Sy
  8. .Sf "char *dbtabname(dbproc, tabnum)"
  9. .Sp "DBPROCESS" "*dbproc"
  10. .Sp "int" "tabnum"
  11. .Co
  12. .Bl
  13. \f2dbtabname()\f1 is one of the \*L browse mode routines.
  14. It is usable only with results from a browse-mode SELECT (\f2i.e.,\f1
  15. a SELECT containing the key words FOR BROWSE).
  16. See the Introduction for a detailed discussion of browse mode.
  17. .Bl
  18. A SELECT query can generate a set of result rows whose columns are
  19. derived from several database tables.
  20. \f2dbtabname()\f1 provides a way for
  21. an application to determine the name of each table involved in an ad hoc query.
  22. If the query has been hardcoded into the program, this routine is obviously unnecessary.
  23. .Bl
  24. The application can call
  25. \f2dbtabname()\f1 any time after \f2dbresults()\f1.
  26. .Bl
  27. Example 7 in the \f2\*L Reference Supplement\f1 contains a call to \f2dbtabname()\f1.
  28. .Bz
  29. .Pa
  30. .Pi dbproc
  31. A pointer to the DBPROCESS structure that provides the connection
  32. for a particular front-end/\*S process.  It contains all the
  33. information that \*L uses to manage communications and data between the
  34. front end and \*S.
  35. .Pi tabnum
  36. The number of the table of interest.
  37. Table numbers start with 1.
  38. Use \f2dbtabcount()\f1
  39. to find out the total number of tables involved in a particular query.
  40. .in -.375i
  41. .Re
  42. .br
  43. A pointer to the null-terminated name of the specified table.
  44. This pointer will be NULL if the table number is out of range
  45. or if the specified table is a \*S work table.
  46. See the
  47. \f2dbtabcount()\f1 manual page for a description of work tables.
  48. .Sa
  49. dbcolbrowse,
  50. dbcolsource,
  51. dbqual,
  52. dbtabbrowse,
  53. dbtabcount,
  54. dbtabsource,
  55. dbtsnewlen,
  56. dbtsnewval,
  57. dbtsput
  58. .mc
  59.